﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;

namespace NMF.Languages
{
    public interface IProperty
    {
        IType Type { get; }
        void SetAPrioriType(IType type);
        string Name { get; }
        object GetValue(object source);
        void SetValue(object source, object value);
        bool IsReadOnly { get; }
        IClass DeclaringClass { get; }
        bool IsCollectionProperty { get; }
        void AssertProperty(IType propertyType);
        void AssertIsValidFor(IClass declaringClass);
    }

    public interface ICollectionProperty
    {
        void AssertCollectionProperty(IType collectionType);
        void InitializeDefaultValue(object source);
        IEnumerable GetItems(object source);
        void AddItem(object source, object value);
        void RemoveItem(object source, object value);
    }
}
